<template>
  <div class="main">
    <!-- 导航栏 -->
    <mt-header fixed title="我的设置" style="background: #f49b00">
      <router-link to="" slot="left">
        <mt-button icon="back" @click="$router.go(-1)"></mt-button>
      </router-link>
    </mt-header>
    <div style="height: 40px"></div>

    <van-cell is-link
      >清楚缓存
      <span id="qingchuhuancun">0M</span>
    </van-cell>

    <van-cell is-link>隐私政策</van-cell>
    <van-cell is-link>隐私设置</van-cell>
    <van-cell is-link>用户协议</van-cell>
    <van-cell is-link>账号安全</van-cell>
    <van-cell is-link>帮助反馈</van-cell>

    <van-cell is-link
      >当前版本
      <span id="versions">v1.5.5</span>
      <span id="jianchagengxin">检查更新</span>
    </van-cell>

    <van-button type="primary" size="large" round id="anniu" @click="logout">退出登录</van-button
    >
  </div>
</template>

<script>
import { Toast } from 'vant';
export default {
  methods: {
    // 退出登录
    logout(){
      if(this.$store.state.uid){
        window.sessionStorage.clear()
        setTimeout(()=>{
          window.location.reload()
        },100)
        this.$router.push("/");
      }else{
        Toast("未登录")
      }
    }
  },
};
</script>

<style lang="scss" scoped>
.main{
  background-color: #fbf7f7;
  height: 100vh;
}
#versions {
  color: #e1a649;
  padding-left: 10px;
}
#jianchagengxin {
  color: #999999;
  padding-left: 155px;
}
#qingchuhuancun {
  color: #999999;
  padding-left: 230px;
}
#anniu {
  color: #f67a10;
  margin-top: 260px;
  background-color: white;
  border-color: #999999;
}

::v-deep .mint-header-title{
  font-size: 15px;
}
</style>